package com.varian.system.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ben
 * @since 2024/7/3
 */
@Mapper
public interface UserRoleMapper {

    int insertBatch(@Param("userId") Long userId, @Param("roleIds") List<Long> roleIds);

    int deleteByUserId(@Param("userId") Long userId);

    int deleteByRoleId(@Param("roleId") Long roleId);

    List<Long> selectRoleIdsByUserId(@Param("userId") Long userId);

    int countByRoleId(@Param("roleId") Long roleId);
}
